﻿@using Orchard.ContentManagement

@{
    var userCanRegister = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
    var enableLostPassword = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
}

<h1 class="page-title">@Html.TitleForPage((string)Model.Title)</h1>
<p>
    @T("Please enter your username and password.")
    @if (userCanRegister)
    {@Html.ActionLink(T("Register").Text, "Register", new { ReturnUrl = Request.QueryString["ReturnUrl"] }) @T(" if you don't have an account.")}
    @if (enableLostPassword)
    {<text> </text> @Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword")}
</p>
@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())

@using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new { ReturnUrl = Request.QueryString["ReturnUrl"] })))
{
    <fieldset class="login-form group">
        <legend>@T("Account Information")</legend>
        <ol>
            <li>
                <label for="username-email">@T("Username")</label>
                @Html.TextBox("userNameOrEmail", "", new { id = "username-email", autofocus = "autofocus" })
                @Html.ValidationMessage("userNameOrEmail")
            </li>
            <li>
                <label for="password">@T("Password")</label>
                @Html.Password("password")
                @Html.ValidationMessage("password")
            </li>
            <li>
                @Html.CheckBox("rememberMe", new { id = "remember-me" })<label class="forcheckbox" for="remember-me">@T("Remember Me")</label>
            </li>
        </ol>
        <button class="primaryAction" type="submit">@T("Sign In")</button>
    </fieldset>
}
@*@Script.Require("jQuery").AtFoot()
    @Script.Require("Bootstrap").AtFoot()*@
@{
Style.Require("Bootstrap").AtHead();
}

